<?
	$sql = $mysqlclass->mysql_my_query("SHOW TABLES", __LINE__, __FILE__);
	if (mysql_num_rows($sql) > 0) {
		while ($row = mysql_fetch_array($sql, MYSQL_NUM)) $dbs[$row[0]] = $row[0];
	} else $row = array();

	if (array_key_exists($setupdata['table_prefix']."comments_data", $dbs)){
		$sql = $mysqlclass->mysql_my_query("SELECT * FROM `".$setupdata['table_prefix']."discribe` WHERE `type`='site_settings01' AND `name`='site_settings_comments_cenzure' AND `type_of_value`='chekbox'", __LINE__, __FILE__);
		if (mysql_num_rows($sql) == 0) $mysqlclass->mysql_my_query("INSERT INTO `tvs_discribe` VALUES ('', 'site_settings01', 'site_settings_comments_cenzure', 'chekbox', 18, '', 'yes')", __LINE__, __FILE__);
		$sql = $mysqlclass->mysql_my_query("SHOW COLUMNS FROM `".$setupdata['table_prefix']."comments_data`", __LINE__, __FILE__);
		if (mysql_num_rows($sql) > 0) while ($r = mysql_fetch_array($sql, MYSQL_NUM)) $row[$r[0]] = $r[0];
		if (!array_key_exists('cenzure', $row)) {
			$mysqlclass->mysql_my_query("ALTER TABLE `".$setupdata['table_prefix']."comments_data` ADD `cenzure` TINYINT NOT NULL", __LINE__, __FILE__);
		}
	}
	
	unset($row);
	
	if (isset($setupdata['modules']['shop']['is'])){
		if (array_key_exists($setupdata['table_prefix']."product_search_cache", $dbs)){
			$row = array();
			$sql = $mysqlclass->mysql_my_query("SHOW COLUMNS FROM `".$setupdata['table_prefix']."product_search_cache`", __LINE__, __FILE__);
			if (mysql_num_rows($sql) > 0) while ($r = mysql_fetch_array($sql, MYSQL_NUM)) $row[$r[0]] = $r[0];
			if (!array_key_exists('query', $row)) {
				$mysqlclass->mysql_my_query("ALTER TABLE `".$setupdata['table_prefix']."product_search_cache` ADD `query` VARCHAR(32) NOT NULL", __LINE__, __FILE__);
			}
		}
	}

	unset($dbs);
	unset($sql);
	unset($row);
?>